package com.yuhanginfo.modules.web.entity;

import java.math.BigDecimal;

import org.hibernate.validator.constraints.Length;

import com.yuhanginfo.common.persistence.WebDataEntity;

/**
 * 信用额度Entity
 * @author lvls
 * @version 2017-09-21
 */
public class WebCredit extends WebDataEntity<WebCredit> {
	
	private static final long serialVersionUID = 1L;
	private Integer userId;		// 会员id
	private BigDecimal money;		// 额度
	private BigDecimal useMoney;		// 已用额度
	private BigDecimal rechargeMoney;		// 充值额度
	private Integer status;		// 冻结状态：0冻结，1正常
	
	public WebCredit() {
		super();
	}

	public WebCredit(String id){
		super(id);
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	
	public BigDecimal getMoney() {
		return money;
	}

	public void setMoney(BigDecimal money) {
		this.money = money;
	}
	
	public BigDecimal getUseMoney() {
		return useMoney;
	}

	public void setUseMoney(BigDecimal useMoney) {
		this.useMoney = useMoney;
	}
	
	public BigDecimal getRechargeMoney() {
		return rechargeMoney;
	}

	public void setRechargeMoney(BigDecimal rechargeMoney) {
		this.rechargeMoney = rechargeMoney;
	}
	
	@Length(min=0, max=11, message="冻结状态：0冻结，1正常长度必须介于 0 和 11 之间")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
}